Error: "File cannot be loaded because the execution of scripts is disabled on this system"

Hello,

I'm executing powershell scripts from command prompt. I've changed my execution policy to Unrestricted. Also, Get-ExecutionPolicy is showing 'Unrestricted'. When i execute following error

"File cannot be loaded because the execution of scripts is disabled on this system"

Reason ?

August 10th, 2011 3:23pm

Is it a 64 bit machine? If so, open the x86 instance of PowerShell and check (set) the execution policy.
Free Windows Admin Tool Kit Click here and download it now
August 10th, 2011 3:33pm

Yes, it's a x64 machine and i'm using SharePoint 2010 Management Shell.

Where can i find x86 instance ?

August 10th, 2011 3:39pm

Yes, it's a x64 machine and i'm using SharePoint 2010 Management Shell.

Where can i find x86 inst

Free Windows Admin Tool Kit Click here and download it now
August 10th, 2011 3:43pm

Please try this

Set-ExecutionPolicy Unrestricted

February 2nd, 2012 2:27am

Try with Force switch

Set-ExecutionPolicy Unrestricted -Force

Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2012 12:27pm

If I use -Force I get...

A parameter cannot be found that matches the parameter name 'Force'

April 30th, 2012 2:07pm

Had the same issue, and this has fixed it for me!

Seems a bit odd that the system would have different Execution Policies for 32 and 64-bit though doesn't it?

Thanks for the help!

Free Windows Admin Tool Kit Click here and download it now
June 15th, 2012 12:52pm

Running powershell as Administrator and executing "set-ExecutionPolicy Unrestricted" worked for me.
February 20th, 2014 1:50pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics